package com.cupk.Dao;

import com.cupk.pojo.Worker;
import org.apache.ibatis.annotations.*;

public interface WorkerMapper {

    @Select("select * from t_worker where id=#{id}")
    Worker selectWorker(int id);


    @Insert("insert into t_worker(name,age,sex,worker_id) value(#{name},#{age},#{sex},#{worker_id})")
    int insertWorker(Worker worker);

    @Update("update t_worker set name=#{name},age=#{age} where id=#{id}")
    int updateWorker(Worker worker);

    @Delete("delete from t_worker where id=#{id}")
    int deleteWorker(int id);

    @Select("select * from t_worker where id=#{param01} and name=#{param02}")
    Worker selectWorkerByIdandName(@Param("param01") int id,@Param("param02") String name);


}
